using UnityEngine;
using System.Collections;

public class Respaw : MonoBehaviour {
	
	
	public GameObject nomezinhoaepraele;
	public int tempo;
	private float tempototal;
	public int numbTotal;
	private int numbWave=0;
	// Use this for initialization
	void Start () 
	{
		
	}
	
	// Update is called once per frame
	void Update () 
	{
		
		tempototal+=Time.deltaTime;
		if(tempototal>=tempo)
		{
			tempototal=0;
			if(numbWave<numbTotal)
			{
				Instantiate(nomezinhoaepraele, this.gameObject.transform.position, Quaternion.identity);
				numbWave++;
			}
		}
		
		
	}
	
	
}
